fhir-crucible / fhir_stu3_models Goto Github PK
View Code? Open in Web Editor NEWFHIR STU3 Models
License: Apache License 2.0
FHIR STU3 Models
License: Apache License 2.0
see fhir-crucible/fhir_models#103 for details
Taking a look at memory usage using, I was able to see that fhir_stu3_models
comes in at 31 MiB (for comparison Rails is at 28 MiB).
Specifically I was using https://github.com/schneems/derailed_benchmarks and running bundle exec derailed bundle:mem
bundle exec derailed bundle:mem
TOP: 175.75 MiB
fhir_client: 77.7852 MiB
fhir_stu3_models: 31.3828 MiB
lib/fhir_stu3_models/fhir/resources/ImagingStudy.rb: 5.3008 MiB
lib/fhir_stu3_models/fhir/resources/DocumentManifest.rb: 1.9961 MiB
lib/fhir_stu3_models/fhir/resources/DocumentReference.rb: 1.9023 MiB
lib/fhir_stu3_models/fhir/resources/AuditEvent.rb: 1.6875 MiB
lib/fhir_stu3_models/fhir/resources/Procedure.rb: 1.375 MiB
lib/fhir_stu3_models/fhir/resources/CarePlan.rb: 1.0586 MiB
lib/fhir_stu3_models/fhir/resources/Observation.rb: 0.9844 MiB
lib/fhir_stu3_models/fhir/resources/FamilyMemberHistory.rb: 0.9219 MiB
lib/fhir_stu3_models/fhir/resources/Condition.rb: 0.8867 MiB
lib/fhir_stu3_models/fhir/resources/PlanDefinition.rb: 0.7305 MiB
lib/fhir_stu3_models/fhir/resources/Media.rb: 0.7031 MiB
lib/fhir_stu3_models/fhir/resources/Patient.rb: 0.625 MiB
lib/fhir_stu3_models/fhir/resources/ProcedureRequest.rb: 0.5781 MiB
lib/fhir_stu3_models/fhir/resources/MedicationStatement.rb: 0.5391 MiB
lib/fhir_stu3_models/fhir/resources/AllergyIntolerance.rb: 0.5273 MiB
lib/fhir_stu3_models/fhir/resources/ExplanationOfBenefit.rb: 0.5156 MiB
lib/fhir_stu3_models/fhir/resources/TestScript.rb: 0.5039 MiB
lib/fhir_stu3_models/fhir/resources/MedicationRequest.rb: 0.4688 MiB
lib/fhir_stu3_models/fhir/resources/Questionnaire.rb: 0.4648 MiB
lib/fhir_stu3_models/fhir/resources/Substance.rb: 0.4336 MiB
lib/fhir_stu3_models/fhir/resources/Specimen.rb: 0.3398 MiB
lib/fhir_stu3_models/fhir/resources/CapabilityStatement.rb: 0.3242 MiB
lib/fhir_stu3_models/fhir/resources/DeviceUseStatement.rb: 0.3242 MiB
lib/fhir_stu3_models/fhir/resources/CareTeam.rb: 0.3086 MiB
This issue gets exacerbated because we are not just including fhir_stu3_models
. We use fhir_client
which also needs fhir_dstu2_models
and fhir_models
(which brings the total up to 77 MiB).
Further details can be examined by running bundle exec derailed bundle:objects
. Largely seems to be an issue with string allocations due to how the models are defined.
I'm not sure what the right solution to this problem is, but I think it's worth noting so that others can be aware of the memory footprint required by these gems.
Hi -- I'm building a list of licenses that the software my company uses, and I'm using some software to do so -- Pivotal's license_finder (https://github.com/pivotal/LicenseFinder).
I see that refer to your Apache license in the README, but the software would pick up the license if you added a LICENSE file with the Apache text. Here's how to do it. (I might normally do a pull request for this, but it strikes me as something a repo owner would want to do herself.)
https://docs.github.com/en/github/building-a-strong-community/adding-a-license-to-a-repository
According to the spec (for STU3 version):
https://www.hl7.org/fhir/stu3/adverseevent.html#search
event, kind, resultingcondition, severity should not be search parameters
Hello.
I'm currently investigating a potential issue with invalid dates not getting caught in this block
I have the following variables :
v = "2011-11-41"
(an invalid date)
primitive_meta = {"type"=>"string", "regex"=>"-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?"}
datatype = "date"
This condition(primitive_meta['regex'] && primitive_meta['type'] != 'number'
) returns true because primitive_meta['type']
is a string.
And (v =~ Regexp.new(primitive_meta['regex']))
returns 0 .
So on the following line match.nil?
returns false meaning that the date is correct.
I don't exactly understand why we have checking for the number
(type because this line FHIR::STU3.primitive?(datatype: datatype, value: v)
would actually work.) so I don't really know what the best solution could be.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.