fhir_models 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +0 -1
- data/Gemfile.lock +1 -1
- data/Rakefile +0 -1
- data/fhir_models.gemspec +1 -1
- data/lib/fhir/metadata.rb +25 -0
- data/lib/fhir/resources/Account.rb +54 -0
- data/lib/fhir/resources/AllergyIntolerance.rb +92 -0
- data/lib/fhir/resources/Appointment.rb +88 -0
- data/lib/fhir/resources/AppointmentResponse.rb +48 -0
- data/lib/fhir/resources/AuditEvent.rb +188 -0
- data/lib/fhir/resources/Basic.rb +42 -0
- data/lib/fhir/resources/Binary.rb +28 -0
- data/lib/fhir/resources/BodySite.rb +44 -0
- data/lib/fhir/resources/Bundle.rb +154 -0
- data/lib/fhir/resources/CarePlan.rb +184 -0
- data/lib/fhir/resources/CareTeam.rb +70 -0
- data/lib/fhir/resources/Claim.rb +490 -0
- data/lib/fhir/resources/ClaimResponse.rb +421 -0
- data/lib/fhir/resources/ClinicalImpression.rb +131 -0
- data/lib/fhir/resources/CodeSystem.rb +225 -0
- data/lib/fhir/resources/Communication.rb +83 -0
- data/lib/fhir/resources/CommunicationRequest.rb +90 -0
- data/lib/fhir/resources/CompartmentDefinition.rb +98 -0
- data/lib/fhir/resources/Composition.rb +136 -0
- data/lib/fhir/resources/ConceptMap.rb +168 -0
- data/lib/fhir/resources/Condition.rb +126 -0
- data/lib/fhir/resources/Conformance.rb +442 -0
- data/lib/fhir/resources/Contract.rb +320 -0
- data/lib/fhir/resources/Coverage.rb +77 -0
- data/lib/fhir/resources/DataElement.rb +104 -0
- data/lib/fhir/resources/DecisionSupportRule.rb +42 -0
- data/lib/fhir/resources/DecisionSupportServiceModule.rb +40 -0
- data/lib/fhir/resources/DetectedIssue.rb +74 -0
- data/lib/fhir/resources/Device.rb +64 -0
- data/lib/fhir/resources/DeviceComponent.rb +74 -0
- data/lib/fhir/resources/DeviceMetric.rb +74 -0
- data/lib/fhir/resources/DeviceUseRequest.rb +68 -0
- data/lib/fhir/resources/DeviceUseStatement.rb +60 -0
- data/lib/fhir/resources/DiagnosticOrder.rb +106 -0
- data/lib/fhir/resources/DiagnosticReport.rb +91 -0
- data/lib/fhir/resources/DocumentManifest.rb +99 -0
- data/lib/fhir/resources/DocumentReference.rb +156 -0
- data/lib/fhir/resources/DomainResource.rb +32 -0
- data/lib/fhir/resources/EligibilityRequest.rb +90 -0
- data/lib/fhir/resources/EligibilityResponse.rb +152 -0
- data/lib/fhir/resources/Encounter.rb +172 -0
- data/lib/fhir/resources/EnrollmentRequest.rb +52 -0
- data/lib/fhir/resources/EnrollmentResponse.rb +52 -0
- data/lib/fhir/resources/EpisodeOfCare.rb +74 -0
- data/lib/fhir/resources/ExpansionProfile.rb +284 -0
- data/lib/fhir/resources/ExplanationOfBenefit.rb +764 -0
- data/lib/fhir/resources/FamilyMemberHistory.rb +110 -0
- data/lib/fhir/resources/Flag.rb +48 -0
- data/lib/fhir/resources/Goal.rb +91 -0
- data/lib/fhir/resources/Group.rb +105 -0
- data/lib/fhir/resources/GuidanceResponse.rb +139 -0
- data/lib/fhir/resources/HealthcareService.rb +122 -0
- data/lib/fhir/resources/ImagingExcerpt.rb +210 -0
- data/lib/fhir/resources/ImagingObjectSelection.rb +136 -0
- data/lib/fhir/resources/ImagingStudy.rb +130 -0
- data/lib/fhir/resources/Immunization.rb +148 -0
- data/lib/fhir/resources/ImmunizationRecommendation.rb +114 -0
- data/lib/fhir/resources/ImplementationGuide.rb +211 -0
- data/lib/fhir/resources/Library.rb +145 -0
- data/lib/fhir/resources/Linkage.rb +56 -0
- data/lib/fhir/resources/List.rb +82 -0
- data/lib/fhir/resources/Location.rb +78 -0
- data/lib/fhir/resources/Measure.rb +160 -0
- data/lib/fhir/resources/MeasureReport.rb +204 -0
- data/lib/fhir/resources/Media.rb +56 -0
- data/lib/fhir/resources/Medication.rb +154 -0
- data/lib/fhir/resources/MedicationAdministration.rb +104 -0
- data/lib/fhir/resources/MedicationDispense.rb +141 -0
- data/lib/fhir/resources/MedicationOrder.rb +172 -0
- data/lib/fhir/resources/MedicationStatement.rb +117 -0
- data/lib/fhir/resources/MessageHeader.rb +124 -0
- data/lib/fhir/resources/ModuleDefinition.rb +249 -0
- data/lib/fhir/resources/NamingSystem.rb +102 -0
- data/lib/fhir/resources/NutritionOrder.rb +211 -0
- data/lib/fhir/resources/Observation.rb +187 -0
- data/lib/fhir/resources/OperationDefinition.rb +153 -0
- data/lib/fhir/resources/OperationOutcome.rb +62 -0
- data/lib/fhir/resources/Order.rb +73 -0
- data/lib/fhir/resources/OrderResponse.rb +46 -0
- data/lib/fhir/resources/OrderSet.rb +38 -0
- data/lib/fhir/resources/Organization.rb +72 -0
- data/lib/fhir/resources/Parameters.rb +117 -0
- data/lib/fhir/resources/Patient.rb +166 -0
- data/lib/fhir/resources/PaymentNotice.rb +71 -0
- data/lib/fhir/resources/PaymentReconciliation.rb +140 -0
- data/lib/fhir/resources/Person.rb +72 -0
- data/lib/fhir/resources/Practitioner.rb +110 -0
- data/lib/fhir/resources/PractitionerRole.rb +102 -0
- data/lib/fhir/resources/Procedure.rb +122 -0
- data/lib/fhir/resources/ProcedureRequest.rb +73 -0
- data/lib/fhir/resources/ProcessRequest.rb +99 -0
- data/lib/fhir/resources/ProcessResponse.rb +92 -0
- data/lib/fhir/resources/Protocol.rb +242 -0
- data/lib/fhir/resources/Provenance.rb +122 -0
- data/lib/fhir/resources/Questionnaire.rb +205 -0
- data/lib/fhir/resources/QuestionnaireResponse.rb +123 -0
- data/lib/fhir/resources/ReferralRequest.rb +68 -0
- data/lib/fhir/resources/RelatedPerson.rb +52 -0
- data/lib/fhir/resources/Resource.rb +24 -0
- data/lib/fhir/resources/RiskAssessment.rb +88 -0
- data/lib/fhir/resources/Schedule.rb +46 -0
- data/lib/fhir/resources/SearchParameter.rb +86 -0
- data/lib/fhir/resources/Sequence.rb +238 -0
- data/lib/fhir/resources/Slot.rb +54 -0
- data/lib/fhir/resources/Specimen.rb +140 -0
- data/lib/fhir/resources/StructureDefinition.rb +164 -0
- data/lib/fhir/resources/StructureMap.rb +297 -0
- data/lib/fhir/resources/Subscription.rb +72 -0
- data/lib/fhir/resources/Substance.rb +86 -0
- data/lib/fhir/resources/SupplyDelivery.rb +54 -0
- data/lib/fhir/resources/SupplyRequest.rb +77 -0
- data/lib/fhir/resources/Task.rb +240 -0
- data/lib/fhir/resources/TestScript.rb +692 -0
- data/lib/fhir/resources/ValueSet.rb +289 -0
- data/lib/fhir/resources/VisionPrescription.rb +97 -0
- data/lib/fhir/types/ActionDefinition.rb +109 -0
- data/lib/fhir/types/Address.rb +36 -0
- data/lib/fhir/types/Annotation.rb +27 -0
- data/lib/fhir/types/Attachment.rb +32 -0
- data/lib/fhir/types/BackboneElement.rb +18 -0
- data/lib/fhir/types/CodeableConcept.rb +20 -0
- data/lib/fhir/types/Coding.rb +26 -0
- data/lib/fhir/types/ContactPoint.rb +26 -0
- data/lib/fhir/types/DataRequirement.rb +78 -0
- data/lib/fhir/types/Element.rb +16 -0
- data/lib/fhir/types/ElementDefinition.rb +605 -0
- data/lib/fhir/types/Extension.rb +87 -0
- data/lib/fhir/types/HumanName.rb +30 -0
- data/lib/fhir/types/Identifier.rb +28 -0
- data/lib/fhir/types/Meta.rb +26 -0
- data/lib/fhir/types/ModuleMetadata.rb +152 -0
- data/lib/fhir/types/Narrative.rb +20 -0
- data/lib/fhir/types/ParameterDefinition.rb +30 -0
- data/lib/fhir/types/Period.rb +20 -0
- data/lib/fhir/types/Quantity.rb +26 -0
- data/lib/fhir/types/Range.rb +20 -0
- data/lib/fhir/types/Ratio.rb +20 -0
- data/lib/fhir/types/Reference.rb +20 -0
- data/lib/fhir/types/SampledData.rb +30 -0
- data/lib/fhir/types/Signature.rb +31 -0
- data/lib/fhir/types/Timing.rb +69 -0
- data/lib/fhir/types/TriggerDefinition.rb +33 -0
- data/lib/fhir_models.rb +2 -2
- data/lib/tasks/tasks.rake +29 -0
- metadata +145 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac9983016f0f356490110523fb5fde22e60e6ee9
|
4
|
+
data.tar.gz: 3cebe77114d90eb1f48e11a4d03be84f0634072c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f240d7b560ef3f66b178c913ab976a46a38209d569766c7495be40c2fc9f11f5e10ce47262a6126ba04f5e4dc34943c809eb4d0a50cd501c08731938497d1f9
|
7
|
+
data.tar.gz: 2b960004d22008d3979b0d99edd39a60ef816b7c8979fd0ac7230dc2ff4996c9f6bcf201c89d138156973c3aa377e0e395c392c20feacb1ac78b89bcc53e1e86
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
data/fhir_models.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.email = "jwalonoski@mitre.org"
|
8
8
|
s.homepage = "https://github.com/fhir-crucible/fhir_models"
|
9
9
|
s.authors = ["Jason Walonoski", "Andre Quina", "Michael O'Keefe"]
|
10
|
-
s.version = '0.3.
|
10
|
+
s.version = '0.3.1'
|
11
11
|
s.files = s.files = `git ls-files`.split("\n")
|
12
12
|
s.add_development_dependency 'pry'
|
13
13
|
s.add_dependency 'rake', '>= 0.8.7'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module FHIR
|
2
|
+
|
3
|
+
PRIMITIVES = {
|
4
|
+
'date' => {'type'=>'string', 'regex'=>'-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?'},
|
5
|
+
'dateTime' => {'type'=>'string', 'regex'=>'-?[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)))?)?)?'},
|
6
|
+
'code' => {'type'=>'string', 'regex'=>'[^\\s]+([\\s]?[^\\s]+)*'},
|
7
|
+
'string' => {'type'=>'string'},
|
8
|
+
'integer' => {'type'=>'number', 'regex'=>'-?([0]|([1-9][0-9]*))'},
|
9
|
+
'oid' => {'type'=>'string', 'regex'=>'urn:oid:(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*))*'},
|
10
|
+
'uri' => {'type'=>'string'},
|
11
|
+
'uuid' => {'type'=>'string', 'regex'=>'urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'},
|
12
|
+
'instant' => {'type'=>'string'},
|
13
|
+
'boolean' => {'type'=>'true | false'},
|
14
|
+
'base64Binary' => {'type'=>'string'},
|
15
|
+
'unsignedInt' => {'type'=>'number', 'regex'=>'[0]|([1-9][0-9]*)'},
|
16
|
+
'markdown' => {'type'=>'string'},
|
17
|
+
'time' => {'type'=>'string', 'regex'=>'([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?'},
|
18
|
+
'id' => {'type'=>'string', 'regex'=>'[A-Za-z0-9\\-\\.]{1,64}'},
|
19
|
+
'positiveInt' => {'type'=>'number', 'regex'=>'[1-9][0-9]*'},
|
20
|
+
'decimal' => {'type'=>'number', 'regex'=>'-?([0]|([1-9][0-9]*))(\\.[0-9]+)?'}
|
21
|
+
}
|
22
|
+
TYPES = ["Identifier", "Coding", "Reference", "Signature", "SampledData", "Quantity", "Period", "Attachment", "Ratio", "Range", "Annotation", "CodeableConcept", "Extension", "BackboneElement", "Narrative", "Element", "HumanName", "ContactPoint", "Meta", "Address", "TriggerDefinition", "ModuleMetadata", "Timing", "ElementDefinition", "DataRequirement", "ActionDefinition", "ParameterDefinition"]
|
23
|
+
RESOURCES = ["CodeSystem", "ValueSet", "DomainResource", "Parameters", "Resource", "Account", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "Binary", "BodySite", "Bundle", "CarePlan", "CareTeam", "Claim", "ClaimResponse", "ClinicalImpression", "Communication", "CommunicationRequest", "CompartmentDefinition", "Composition", "ConceptMap", "Condition", "Conformance", "Contract", "Coverage", "DataElement", "DecisionSupportRule", "DecisionSupportServiceModule", "DetectedIssue", "Device", "DeviceComponent", "DeviceMetric", "DeviceUseRequest", "DeviceUseStatement", "DiagnosticOrder", "DiagnosticReport", "DocumentManifest", "DocumentReference", "EligibilityRequest", "EligibilityResponse", "Encounter", "EnrollmentRequest", "EnrollmentResponse", "EpisodeOfCare", "ExpansionProfile", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "Group", "GuidanceResponse", "HealthcareService", "ImagingExcerpt", "ImagingObjectSelection", "ImagingStudy", "Immunization", "ImmunizationRecommendation", "ImplementationGuide", "Library", "Linkage", "List", "Location", "Measure", "MeasureReport", "Media", "Medication", "MedicationAdministration", "MedicationDispense", "MedicationOrder", "MedicationStatement", "MessageHeader", "ModuleDefinition", "NamingSystem", "NutritionOrder", "Observation", "OperationDefinition", "OperationOutcome", "Order", "OrderResponse", "OrderSet", "Organization", "Patient", "PaymentNotice", "PaymentReconciliation", "Person", "Practitioner", "PractitionerRole", "Procedure", "ProcedureRequest", "ProcessRequest", "ProcessResponse", "Protocol", "Provenance", "Questionnaire", "QuestionnaireResponse", "ReferralRequest", "RelatedPerson", "RiskAssessment", "Schedule", "SearchParameter", "Sequence", "Slot", "Specimen", "StructureDefinition", "StructureMap", "Subscription", "Substance", "SupplyDelivery", "SupplyRequest", "Task", "TestScript", "VisionPrescription"]
|
24
|
+
|
25
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module FHIR
|
2
|
+
class Account < FHIR::Model
|
3
|
+
include FHIR::Hashable
|
4
|
+
include FHIR::Json
|
5
|
+
include FHIR::Xml
|
6
|
+
|
7
|
+
SEARCH_PARAMS = ["balance", "identifier", "name", "owner", "patient", "period", "status", "subject", "type"]
|
8
|
+
METADATA = {
|
9
|
+
'id' => {'type'=>'id', 'path'=>'Account.id', 'min'=>0, 'max'=>1},
|
10
|
+
'meta' => {'type'=>'Meta', 'path'=>'Account.meta', 'min'=>0, 'max'=>1},
|
11
|
+
'implicitRules' => {'type'=>'uri', 'path'=>'Account.implicitRules', 'min'=>0, 'max'=>1},
|
12
|
+
'language' => {'type'=>'code', 'path'=>'Account.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
|
13
|
+
'text' => {'type'=>'Narrative', 'path'=>'Account.text', 'min'=>0, 'max'=>1},
|
14
|
+
'contained' => {'type'=>'Resource', 'path'=>'Account.contained', 'min'=>0, 'max'=>Float::INFINITY},
|
15
|
+
'extension' => {'type'=>'Extension', 'path'=>'Account.extension', 'min'=>0, 'max'=>Float::INFINITY},
|
16
|
+
'modifierExtension' => {'type'=>'Extension', 'path'=>'Account.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
|
17
|
+
'identifier' => {'type'=>'Identifier', 'path'=>'Account.identifier', 'min'=>0, 'max'=>Float::INFINITY},
|
18
|
+
'name' => {'type'=>'string', 'path'=>'Account.name', 'min'=>0, 'max'=>1},
|
19
|
+
'type' => {'type'=>'CodeableConcept', 'path'=>'Account.type', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>nil}},
|
20
|
+
'status' => {'valid_codes'=>{'http://hl7.org/fhir/account-status'=>['active', 'inactive']}, 'type'=>'code', 'path'=>'Account.status', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'preferred', 'uri'=>'http://hl7.org/fhir/ValueSet/account-status'}},
|
21
|
+
'activePeriod' => {'type'=>'Period', 'path'=>'Account.activePeriod', 'min'=>0, 'max'=>1},
|
22
|
+
'currency' => {'type'=>'Coding', 'path'=>'Account.currency', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://www.iso.org/iso/home/standards/currency_codes'}},
|
23
|
+
'balance' => {'type'=>'Quantity', 'path'=>'Account.balance', 'min'=>0, 'max'=>1},
|
24
|
+
'coveragePeriod' => {'type'=>'Period', 'path'=>'Account.coveragePeriod', 'min'=>0, 'max'=>1},
|
25
|
+
'subject' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/Device', 'http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/Location', 'http://hl7.org/fhir/StructureDefinition/HealthcareService', 'http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Account.subject', 'min'=>0, 'max'=>1},
|
26
|
+
'owner' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Account.owner', 'min'=>0, 'max'=>1},
|
27
|
+
'description' => {'type'=>'string', 'path'=>'Account.description', 'min'=>0, 'max'=>1}
|
28
|
+
}
|
29
|
+
|
30
|
+
attr_accessor :id # 0-1 id
|
31
|
+
attr_accessor :meta # 0-1 Meta
|
32
|
+
attr_accessor :implicitRules # 0-1 uri
|
33
|
+
attr_accessor :language # 0-1 code
|
34
|
+
attr_accessor :text # 0-1 Narrative
|
35
|
+
attr_accessor :contained # 0-* [ Resource ]
|
36
|
+
attr_accessor :extension # 0-* [ Extension ]
|
37
|
+
attr_accessor :modifierExtension # 0-* [ Extension ]
|
38
|
+
attr_accessor :identifier # 0-* [ Identifier ]
|
39
|
+
attr_accessor :name # 0-1 string
|
40
|
+
attr_accessor :type # 0-1 CodeableConcept
|
41
|
+
attr_accessor :status # 0-1 code
|
42
|
+
attr_accessor :activePeriod # 0-1 Period
|
43
|
+
attr_accessor :currency # 0-1 Coding
|
44
|
+
attr_accessor :balance # 0-1 Quantity
|
45
|
+
attr_accessor :coveragePeriod # 0-1 Period
|
46
|
+
attr_accessor :subject # 0-1 Reference(Patient|Device|Practitioner|Location|HealthcareService|Organization)
|
47
|
+
attr_accessor :owner # 0-1 Reference(Organization)
|
48
|
+
attr_accessor :description # 0-1 string
|
49
|
+
|
50
|
+
def resourceType
|
51
|
+
'Account'
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|