Coder Social home page Coder Social logo

fhir_stu3_models's People

Contributors

360dgries avatar andrequina avatar arscan avatar asross avatar dehall avatar dependabot[bot] avatar etiennedepaulis avatar jammjammjamm avatar jawalonoski avatar olbrich avatar radamson avatar wesrich avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fhir_stu3_models's Issues

Large memory usage

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.

Add LICENSE file?

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

Invalid date not triggering an error

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.