healthcare_phony 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitattributes +1 -0
- data/.github/workflows/gem-push.yml +42 -0
- data/.github/workflows/ruby.yml +33 -0
- data/.gitignore +64 -0
- data/.rdoc_options +23 -0
- data/.rubocop.yml +10 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +21 -0
- data/README.md +285 -0
- data/Rakefile +12 -0
- data/VERSION +1 -0
- data/healthcare_phony.gemspec +36 -0
- data/lib/healthcare_phony.rb +88 -0
- data/lib/healthcare_phony/address.rb +89 -0
- data/lib/healthcare_phony/assigning_authority.rb +6 -0
- data/lib/healthcare_phony/cell_phone_number.rb +20 -0
- data/lib/healthcare_phony/data_files/address_type.yml +7 -0
- data/lib/healthcare_phony/data_files/adt_event_types.yml +59 -0
- data/lib/healthcare_phony/data_files/degree.yml +9 -0
- data/lib/healthcare_phony/data_files/discharge_disposition.yml +15 -0
- data/lib/healthcare_phony/data_files/ethnic_group.yml +10 -0
- data/lib/healthcare_phony/data_files/hl7_message_types.yml +4 -0
- data/lib/healthcare_phony/data_files/language.yml +7 -0
- data/lib/healthcare_phony/data_files/marital_status.yml +49 -0
- data/lib/healthcare_phony/data_files/mdm_event_types.yml +12 -0
- data/lib/healthcare_phony/data_files/oru_event_types.yml +2 -0
- data/lib/healthcare_phony/data_files/race.yml +13 -0
- data/lib/healthcare_phony/data_files/religion.yml +250 -0
- data/lib/healthcare_phony/data_files/tele_equipment_type.yml +10 -0
- data/lib/healthcare_phony/data_files/tele_use_code.yml +9 -0
- data/lib/healthcare_phony/diagnosis.rb +12 -0
- data/lib/healthcare_phony/doctor.rb +25 -0
- data/lib/healthcare_phony/email.rb +25 -0
- data/lib/healthcare_phony/ethnic_group.rb +34 -0
- data/lib/healthcare_phony/gender.rb +22 -0
- data/lib/healthcare_phony/helper.rb +72 -0
- data/lib/healthcare_phony/hl7_message.rb +136 -0
- data/lib/healthcare_phony/home_phone_number.rb +20 -0
- data/lib/healthcare_phony/identifier.rb +23 -0
- data/lib/healthcare_phony/insurance.rb +6 -0
- data/lib/healthcare_phony/language.rb +30 -0
- data/lib/healthcare_phony/marital_status.rb +31 -0
- data/lib/healthcare_phony/patient.rb +114 -0
- data/lib/healthcare_phony/patient_visit.rb +96 -0
- data/lib/healthcare_phony/person_name.rb +104 -0
- data/lib/healthcare_phony/phone_number.rb +85 -0
- data/lib/healthcare_phony/procedure.rb +6 -0
- data/lib/healthcare_phony/race.rb +30 -0
- data/lib/healthcare_phony/religion.rb +32 -0
- data/lib/healthcare_phony/templates/adt_example.erb +6 -0
- data/lib/healthcare_phony/templates/csv_example.erb +4 -0
- data/lib/healthcare_phony/version.rb +5 -0
- data/lib/healthcare_phony/visit_admission.rb +53 -0
- data/lib/healthcare_phony/visit_discharge.rb +62 -0
- data/lib/healthcare_phony/visit_doctors.rb +19 -0
- data/lib/healthcare_phony/visit_location.rb +106 -0
- data/lib/healthcare_phony/work_phone_number.rb +20 -0
- metadata +185 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dd82a9bb551ceeeafe3a73126f9b09de624303e71abc98b26e1d5510fe226690
|
4
|
+
data.tar.gz: ac7a04cb59c0aca105b391a1db38f4492d4b220588273b604b36156df3ff9102
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3ca23f7f3eb78eaa6a3c89ba444f7293a1879852ba9b44a64b56bf2d9b3386f27cdc1640513cac0603c0f9392c808667109a5d65bd75da4b91cd9b340af3a718
|
7
|
+
data.tar.gz: 7a03f56fb3d5ff4a6c9942148fd94f16c57bbdfd2a7288ebd1a21250bcf28159df91feec6de7157fca81c1f44a0a83df2544fd200b9eff01ce24744712a780ed
|
data/.gitattributes
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
lib/healthcare_phony/templates/adt_example.erb text eol=cr
|
@@ -0,0 +1,42 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ main ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ main ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
build:
|
11
|
+
name: Build + Publish
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
- name: Set up Ruby 2.6
|
17
|
+
uses: actions/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: 2.6.x
|
20
|
+
|
21
|
+
- name: Publish to GPR
|
22
|
+
run: |
|
23
|
+
mkdir -p $HOME/.gem
|
24
|
+
touch $HOME/.gem/credentials
|
25
|
+
chmod 0600 $HOME/.gem/credentials
|
26
|
+
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
27
|
+
gem build *.gemspec
|
28
|
+
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
29
|
+
env:
|
30
|
+
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
|
31
|
+
OWNER: ${{ github.repository_owner }}
|
32
|
+
|
33
|
+
- name: Publish to RubyGems
|
34
|
+
run: |
|
35
|
+
mkdir -p $HOME/.gem
|
36
|
+
touch $HOME/.gem/credentials
|
37
|
+
chmod 0600 $HOME/.gem/credentials
|
38
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
39
|
+
gem build *.gemspec
|
40
|
+
gem push *.gem
|
41
|
+
env:
|
42
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ main ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ main ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v2
|
23
|
+
- name: Set up Ruby
|
24
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
25
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
26
|
+
# uses: ruby/setup-ruby@v1
|
27
|
+
uses: ruby/setup-ruby@21351ecc0a7c196081abca5dc55b08f085efe09a
|
28
|
+
with:
|
29
|
+
ruby-version: 2.6
|
30
|
+
- name: Install dependencies
|
31
|
+
run: bundle install
|
32
|
+
- name: Run tests
|
33
|
+
run: bundle exec rake
|
data/.gitignore
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
/.yardoc
|
2
|
+
/coverage/
|
3
|
+
/bin/
|
4
|
+
/pkg/
|
5
|
+
/spec/reports/
|
6
|
+
/tmp/
|
7
|
+
*.gem
|
8
|
+
*.rbc
|
9
|
+
/.config
|
10
|
+
/InstalledFiles
|
11
|
+
/spec/examples.txt
|
12
|
+
/test/tmp/
|
13
|
+
/test/version_tmp/
|
14
|
+
/.idea
|
15
|
+
/bin
|
16
|
+
|
17
|
+
# Used by dotenv library to load environment variables.
|
18
|
+
# .env
|
19
|
+
|
20
|
+
# Ignore Byebug command history file.
|
21
|
+
.byebug_history
|
22
|
+
|
23
|
+
## Specific to RubyMotion:
|
24
|
+
.dat*
|
25
|
+
.repl_history
|
26
|
+
build/
|
27
|
+
*.bridgesupport
|
28
|
+
build-iPhoneOS/
|
29
|
+
build-iPhoneSimulator/
|
30
|
+
|
31
|
+
## Specific to RubyMotion (use of CocoaPods):
|
32
|
+
#
|
33
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
34
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
35
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
36
|
+
#
|
37
|
+
# vendor/Pods/
|
38
|
+
|
39
|
+
## Documentation cache and generated files:
|
40
|
+
/.yardoc/
|
41
|
+
/_yardoc/
|
42
|
+
/doc/
|
43
|
+
/rdoc/
|
44
|
+
|
45
|
+
## Environment normalization:
|
46
|
+
/.bundle/
|
47
|
+
/vendor/bundle
|
48
|
+
/lib/bundler/man/
|
49
|
+
|
50
|
+
# for a library or gem, you might want to ignore these files since the code is
|
51
|
+
# intended to run in multiple environments; otherwise, check them in:
|
52
|
+
Gemfile.lock
|
53
|
+
.ruby-version
|
54
|
+
.ruby-gemset
|
55
|
+
|
56
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
57
|
+
.rvmrc
|
58
|
+
|
59
|
+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
60
|
+
# .rubocop-https?--*
|
61
|
+
.DS_Store
|
62
|
+
|
63
|
+
# My debugger script
|
64
|
+
/austin_debugger.rb
|
data/.rdoc_options
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
--- !ruby/object:RDoc::Options
|
2
|
+
encoding: UTF-8
|
3
|
+
static_path: []
|
4
|
+
rdoc_include:
|
5
|
+
- "."
|
6
|
+
- "/Users/amoody/RubymineProjects/healthcare_phony"
|
7
|
+
charset: UTF-8
|
8
|
+
exclude:
|
9
|
+
hyperlink_all: false
|
10
|
+
line_numbers: false
|
11
|
+
locale:
|
12
|
+
locale_dir: locale
|
13
|
+
locale_name:
|
14
|
+
main_page:
|
15
|
+
markup: tomdoc
|
16
|
+
output_decoration: true
|
17
|
+
page_dir:
|
18
|
+
show_hash: false
|
19
|
+
tab_width: 8
|
20
|
+
template_stylesheets: []
|
21
|
+
title:
|
22
|
+
visibility: :protected
|
23
|
+
webcvs:
|
data/.rubocop.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
+
|
9
|
+
## Our Standards
|
10
|
+
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
+
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
18
|
+
|
19
|
+
Examples of unacceptable behavior include:
|
20
|
+
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
+
* Public or private harassment
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
27
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
+
professional setting
|
29
|
+
|
30
|
+
## Enforcement Responsibilities
|
31
|
+
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
33
|
+
|
34
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
35
|
+
|
36
|
+
## Scope
|
37
|
+
|
38
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
39
|
+
|
40
|
+
## Enforcement
|
41
|
+
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at austin.moody@hey.com. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
54
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
+
|
60
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
66
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
70
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
+
|
74
|
+
## Attribution
|
75
|
+
|
76
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
+
|
79
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
82
|
+
|
83
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Austin Moody
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,285 @@
|
|
1
|
+
# HealthcarePhony
|
2
|
+
|
3
|
+
This is an admittedly _rough_ RubyGem used to generate fake data that can be used in creating test HL7, CSV, or other data for healthcare integration testing.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'healthcare_phony'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle install
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install healthcare_phony
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
The general purpose of this gem is to generate various pieces of data useful in creating test healthcare integration data. Like HL7 messages or CSV files. The high level objects available are:
|
24
|
+
|
25
|
+
* Patient
|
26
|
+
* Patient Visit
|
27
|
+
* HL7 Message
|
28
|
+
* Doctor
|
29
|
+
|
30
|
+
### Patient
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
patient = Patient.new
|
34
|
+
```
|
35
|
+
|
36
|
+
The above will give you a default Patient object:
|
37
|
+
|
38
|
+
```
|
39
|
+
#<HealthcarePhony::Patient:0x00007fa7ab1b8230
|
40
|
+
@account_number=
|
41
|
+
#<HealthcarePhony::Identifier:0x00007fa7a9dc3ef0
|
42
|
+
@identifier="4969529871",
|
43
|
+
@identifier_type_code="AN">,
|
44
|
+
@addresses=
|
45
|
+
[#<HealthcarePhony::Address:0x00007fa7aeb337f8
|
46
|
+
@address_line1="4973 Bruen Square",
|
47
|
+
@address_line2="Suite 628",
|
48
|
+
@address_type="L",
|
49
|
+
@address_type_data_file=nil,
|
50
|
+
@city="West Melva",
|
51
|
+
@country="",
|
52
|
+
@postal_code="48030",
|
53
|
+
@set_blank=false,
|
54
|
+
@state="MI">],
|
55
|
+
@birth_order="",
|
56
|
+
@cell_phone=
|
57
|
+
#<HealthcarePhony::CellPhoneNumber:0x00007fa7a992d238
|
58
|
+
@area_code="641",
|
59
|
+
@country_code="++1",
|
60
|
+
@equipment_type="CP",
|
61
|
+
@equipment_type_data_file=nil,
|
62
|
+
@exchange_code="586",
|
63
|
+
@set_blank=false,
|
64
|
+
@subscriber_number="9470",
|
65
|
+
@use_code="ORN",
|
66
|
+
@use_code_data_file=nil>,
|
67
|
+
@date_of_birth=#<Date: 2005-12-01 ((2453706j,0s,0n),+0s,2299161j)>,
|
68
|
+
@death_datetime=2007-11-05 15:24:26 -0500,
|
69
|
+
@death_indicator="Y",
|
70
|
+
@ethnic_group=
|
71
|
+
#<HealthcarePhony::EthnicGroup:0x00007fa7a9d94128
|
72
|
+
@code="N",
|
73
|
+
@coding_system="HL70189",
|
74
|
+
@description="Not Hispanic or Latino",
|
75
|
+
@set_blank=false>,
|
76
|
+
@gender=
|
77
|
+
#<HealthcarePhony::Gender:0x00007fa7a9983458
|
78
|
+
@code="U",
|
79
|
+
@description="Unknown">,
|
80
|
+
@home_phone=
|
81
|
+
#<HealthcarePhony::HomePhoneNumber:0x00007fa7a9906cf0
|
82
|
+
@area_code="504",
|
83
|
+
@country_code="++1",
|
84
|
+
@equipment_type="PH",
|
85
|
+
@equipment_type_data_file=nil,
|
86
|
+
@exchange_code="931",
|
87
|
+
@set_blank=false,
|
88
|
+
@subscriber_number="8965",
|
89
|
+
@use_code="PRN",
|
90
|
+
@use_code_data_file=nil>,
|
91
|
+
@language=
|
92
|
+
#<HealthcarePhony::Language:0x00007fa7a9993c40
|
93
|
+
@code="spa",
|
94
|
+
@coding_system="HL70296",
|
95
|
+
@description="spanish">,
|
96
|
+
@marital_status=
|
97
|
+
#<HealthcarePhony::MaritalStatus:0x00007fa7a99909f0
|
98
|
+
@code="T",
|
99
|
+
@coding_system="HL70002",
|
100
|
+
@description="Unreported">,
|
101
|
+
@medical_record_number=
|
102
|
+
#<HealthcarePhony::Identifier:0x00007fa7a9d9d840
|
103
|
+
@identifier="5727985905",
|
104
|
+
@identifier_type_code="MR">,
|
105
|
+
@multiple_birth_indicator="N",
|
106
|
+
@names=
|
107
|
+
[#<HealthcarePhony::PersonName:0x00007fa7ab1b80f0
|
108
|
+
@degree="CPNP",
|
109
|
+
@family_name="Murray",
|
110
|
+
@gender=nil,
|
111
|
+
@given_name="Claude",
|
112
|
+
@middle_name="Howe",
|
113
|
+
@prefix="Mr.",
|
114
|
+
@set_blank=false,
|
115
|
+
@suffix="I">],
|
116
|
+
@races=
|
117
|
+
[#<HealthcarePhony::Race:0x00007fa7a9982eb8
|
118
|
+
@code="1002-5",
|
119
|
+
@coding_system="",
|
120
|
+
@description="American Indian or Alaska Native">],
|
121
|
+
@religion=
|
122
|
+
#<HealthcarePhony::Religion:0x00007fa7a9d462e8
|
123
|
+
@code="PRO",
|
124
|
+
@coding_system="HL70006",
|
125
|
+
@description="Christian: Protestant">,
|
126
|
+
@ssn="320-79-1958",
|
127
|
+
@work_phone=
|
128
|
+
#<HealthcarePhony::WorkPhoneNumber:0x00007fa7a9959838
|
129
|
+
@area_code="508",
|
130
|
+
@country_code="++1",
|
131
|
+
@equipment_type="PH",
|
132
|
+
@equipment_type_data_file=nil,
|
133
|
+
@exchange_code="760",
|
134
|
+
@set_blank=false,
|
135
|
+
@subscriber_number="8916",
|
136
|
+
@use_code="WPN",
|
137
|
+
@use_code_data_file=nil>>
|
138
|
+
```
|
139
|
+
|
140
|
+
The creation of the Patient can be customized by sending the following parameters when initializing:
|
141
|
+
|
142
|
+
* blank → An integer representing the % of times PatientName components should be blank.
|
143
|
+
* names_count → By default one PatientName is generated, this allows you to specify a number > 1.
|
144
|
+
* address_count → By default on Address is generated, this allows you to specify a number > 1.
|
145
|
+
* min_age → A minimum age (in years) for the Patient.
|
146
|
+
* max_age → A maximum age (in years) for the Patient.
|
147
|
+
* race_count → By default on Race is generated, this allows you to specify a number > 1.
|
148
|
+
* gender → A Gender object which will be used to generate a Male or Female name if specified.
|
149
|
+
* degree_data_file → Location of YAML file containing a list of potential degrees to choose from. By default the gem supplied file will be used. The default file [degree.yml](https://github.com/austinmoody/healthcare_phony/blob/main/lib/healthcare_phony/data_files/degree.yml).
|
150
|
+
|
151
|
+
### Patient Visit
|
152
|
+
|
153
|
+
```ruby
|
154
|
+
pv = HealthcarePhony::PatientVisit.new
|
155
|
+
```
|
156
|
+
|
157
|
+
The above will give you a default PatientVisit object:
|
158
|
+
|
159
|
+
```
|
160
|
+
#<HealthcarePhony::PatientVisit:0x00007fcb251055c0
|
161
|
+
@admission=
|
162
|
+
#<HealthcarePhony::VisitAdmission:0x00007fcb291bc6b8
|
163
|
+
@datetime=2021-01-04 05:31:33 -0500,
|
164
|
+
@reason="Tempore libero neque voluptatibus.",
|
165
|
+
@source="2",
|
166
|
+
@type="L">,
|
167
|
+
@ambulatory_status="A6",
|
168
|
+
@bed_status="K",
|
169
|
+
@discharge=
|
170
|
+
#<HealthcarePhony::VisitDischarge:0x00007fcb254b7da8
|
171
|
+
@datetime=nil,
|
172
|
+
@disposition="",
|
173
|
+
@location="">,
|
174
|
+
@doctors=
|
175
|
+
#<HealthcarePhony::VisitDoctors:0x00007fcb251054a8
|
176
|
+
@admitting=
|
177
|
+
#<HealthcarePhony::Doctor:0x00007fcb29180a50
|
178
|
+
@identifier=1777467337,
|
179
|
+
@name=
|
180
|
+
#<HealthcarePhony::PersonName:0x00007fcb291906f8
|
181
|
+
@degree="MD",
|
182
|
+
@family_name="King",
|
183
|
+
@gender=nil,
|
184
|
+
@given_name="Giuseppe",
|
185
|
+
@middle_name="Pouros",
|
186
|
+
@prefix="Miss",
|
187
|
+
@set_blank=false,
|
188
|
+
@suffix="Ret.">>,
|
189
|
+
@attending=
|
190
|
+
#<HealthcarePhony::Doctor:0x00007fcb25105480
|
191
|
+
@identifier=1847601659,
|
192
|
+
@name=
|
193
|
+
#<HealthcarePhony::PersonName:0x00007fcb25125dc0
|
194
|
+
@degree="DO",
|
195
|
+
@family_name="Breitenberg",
|
196
|
+
@gender=nil,
|
197
|
+
@given_name="Hailey",
|
198
|
+
@middle_name="Beer",
|
199
|
+
@prefix="Sen.",
|
200
|
+
@set_blank=false,
|
201
|
+
@suffix="III">>,
|
202
|
+
@consulting=
|
203
|
+
#<HealthcarePhony::Doctor:0x00007fcb291730a8
|
204
|
+
@identifier=1422794804,
|
205
|
+
@name=
|
206
|
+
#<HealthcarePhony::PersonName:0x00007fcb29182ee0
|
207
|
+
@degree="DO",
|
208
|
+
@family_name="McClure",
|
209
|
+
@gender=nil,
|
210
|
+
@given_name="Raleigh",
|
211
|
+
@middle_name="Hettinger",
|
212
|
+
@prefix="Rev.",
|
213
|
+
@set_blank=false,
|
214
|
+
@suffix="JD">>,
|
215
|
+
@referring=
|
216
|
+
#<HealthcarePhony::Doctor:0x00007fcb29151818
|
217
|
+
@identifier=1599337791,
|
218
|
+
@name=
|
219
|
+
#<HealthcarePhony::PersonName:0x00007fcb29169648
|
220
|
+
@degree="MD",
|
221
|
+
@family_name="Kreiger",
|
222
|
+
@gender=nil,
|
223
|
+
@given_name="Pierre",
|
224
|
+
@middle_name="Olson",
|
225
|
+
@prefix="Fr.",
|
226
|
+
@set_blank=false,
|
227
|
+
@suffix="PhD">>>,
|
228
|
+
@hospital_service="URO",
|
229
|
+
@location=
|
230
|
+
#<HealthcarePhony::VisitLocation:0x00007fcb2915e220
|
231
|
+
@bed="8y3",
|
232
|
+
@building="4",
|
233
|
+
@description="Numquam officiis placeat voluptatibus.",
|
234
|
+
@facility="Ipsam aut non repellat.",
|
235
|
+
@floor="81",
|
236
|
+
@point_of_care="QFDYRRTIFU",
|
237
|
+
@room="243",
|
238
|
+
@status="G",
|
239
|
+
@type="D">,
|
240
|
+
@patient_class="I",
|
241
|
+
@patient_type="",
|
242
|
+
@readmission_indicator="",
|
243
|
+
@vip_indicator="",
|
244
|
+
@visit_number=
|
245
|
+
#<HealthcarePhony::Identifier:0x00007fcb291c6b68
|
246
|
+
@identifier="3738009164",
|
247
|
+
@identifier_type_code="VN">>
|
248
|
+
```
|
249
|
+
|
250
|
+
The creation of the PatientVisit can be customized by sending the following parameters when initializing:
|
251
|
+
|
252
|
+
* hospital_service → Array of Hospital Service codes (PV1.10) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise default HL7 v2.5.1 Table 0069 values are used.
|
253
|
+
* patient_class → Array of Patient Class codes (PV1.2) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise default HL7 v2.5.1 Table 0004 values are used.
|
254
|
+
* ambulatory_status → Array of Ambulatory Status codes (PV1.15) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise default HL7 v2.5.1 Table 0009 values are used.
|
255
|
+
* bed_status → Array of Bed Status codes (PV1.40) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise default HL7 v2.5.1 Table 0116 values are used.
|
256
|
+
* patient_type → Array of Patient Type codes (PV1.18) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise this field is left blank.
|
257
|
+
* vip_indicator → Array of Patient Type codes (PV1.18) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise this field is left blank.
|
258
|
+
* point_of_care → Array of potential points of care (PV1.3.1) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise random example generated.
|
259
|
+
* room → Array of potential rooms (PV1.3.2) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise a random 3 digit number is generated.
|
260
|
+
* bed → Array of potential beds (PV1.3.3) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise a 3 character sequence is created.
|
261
|
+
* facility → Array of potential facility names (PV1.3.4) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise a random string is generated.
|
262
|
+
* location_status → Array of potential location statuses (PV1.3.5) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise a random uppercase letter is generated to use.
|
263
|
+
* person_location_type → Array of potential person location types (PV1.3.6) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise values from HL7 v2.5.1 Table 0305 will be used.
|
264
|
+
* building → Array of potential building information (PV1.3.7) to randomly choose from. Specified as a comma separated String or Ruby array. Otherwise a random digit 1-9 is used.
|
265
|
+
* floor → Array of potential floor information (PV1.3.8) to randomly choose from. Specified as a comma separated String or Ruby array. Otherwise a random 2 digit number is used.
|
266
|
+
* location_description → Array of potential location descriptions (PV1.3.9) to randomly choose from. Specified as a comma separated String or Ruby array. Otherwise a random string is generated.
|
267
|
+
* admit_source → Array of Admit Source codes (PV1.14) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise default HL7 v2.5.1 Table 0023 values are used.
|
268
|
+
* admission_type → Array of Admission Type (PV1.4) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise default HL7 v2.5.1. Table 0007 values are used.
|
269
|
+
* admit_reason → Array of values to use as Admit Reason (PV2.3) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise a string of data is generated with Faker::Lorem.sentence
|
270
|
+
* event_type → The HL7 trigger event type that this visit is associated with.
|
271
|
+
* discharge_disposition → Array of discharge disposition codes (PV1.36) to randomly choose from. Specified as comma separated String or Ruby array. Otherwise default HL7 v2.5.1 Table 0112 values are used.
|
272
|
+
* discharge_location → Array of discharge locations to randomly choose from. Specified as comma separated String or Ruby array. Otherwise a string of data is generated with Faker::Lorem.sentence
|
273
|
+
* admit_datetime → The admit date/time associated with this visit. If not specified the current date/time is used.
|
274
|
+
|
275
|
+
## Contributing
|
276
|
+
|
277
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/austinmoody/healthcare_phony. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/healthcare_phony/blob/master/CODE_OF_CONDUCT.md).
|
278
|
+
|
279
|
+
## License
|
280
|
+
|
281
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
282
|
+
|
283
|
+
## Code of Conduct
|
284
|
+
|
285
|
+
Everyone interacting in the HealthcarePhony project's codebase, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/austinmoody/healthcare_phony/blob/master/CODE_OF_CONDUCT.md).
|