Computer programming Flashcards
Investigators wish to use EHR data to determine the dose-related effects of a medication on a physiologic variable of interest. The medication is given parenterally, the dose varies by patient weight and may range from zero to some theoretical toxic maximum dose. The numeric value of the dose is an example of what kind of measure:
a.
Ratio
b.
Nominal
c.
Interval
d.
Ordinal
Ratio
Medication dose as described is a continuous variable where “zero” has meaning and represents no measurable quantity of the attribute. Therefore, the IV medication dose described is a “ratio” measure. Interval measures are also numeric, but “zero” is often arbitrarily set. As an example, the area of a plot of land in acres is a ratio measure, because the concept of “zero acres” has meaning. In contrast, calendar year is an interval – it is meaningless to say something has “zero” calendar years, but you can say that zero years have elapsed. So the transformation from calendar year to elapsed years (or, for example, age of a patient in years) converts the measure from an interval to a ratio. Nominal values have a “name” only and no rank or priority is implied (ex: Male and Female). Ordinal values have a name, but also have an implied order (ex: Small, Medium, Large).
You are implementing a checksum function to prevent against errors of transcription in a web form that collects the user’s first name. The checksum function involves 3 steps: 1) Convert each letter in the name from a-z to a corresponding number from 1-26; 2) Calculate the sum of all numbers obtained in step 1; 3) Use the base 10 modulo* of the sum in step 2 as the checksum numeral *recall that the base 10 modulo is the remainder when a number is divided by 10. Ex: 13 mod 10 (the base 10 modulo of 13) = 3. Using this method, what is the checksum numeral for the first name “PESHA”?
Select one:
a.
0
b.
4
c.
9
d.
49
correct answer is: 9
Step 1: P = 16 E = 5 S = 19 H = 8 A = 1
Step 2: 16+5+19+8+1 = 49
Step 3; 49 mod 10 = 9
Your Electronic Health Record (EHR) contains a column in a patient list that displays the length of stay for an inpatient. You notice that sorting by length of stay produces strange results, with the sort order for 9 patients appearing as “1.5, 1, 10, 12, 2.7, 20, 3.5, 3, 35”. What is the most likely defect?
Select one:
a.
The column is formatted as a text field instead of a numeric field
b.
The subroutine for sort is defective
c.
The calculation of length of stay is incorrect
d.
The column is sorting by string length
The column is formatted as a text field instead of a numeric field
The results are sorted by ASCII values. The most likely defect is that the column is sorted as text (ASCII order) rather than numeric value.
The last digit of the NPI (National Provider Identifier) is an example of
Select one:
a.
Checksum
b.
Endianness
c.
Steganography
d.
Cryptography
Checksum
The last digit of the NPI is calculated from a hash function using the Luhn algorithm and is an example of a checksum. Checksum values are used as a way to provide data integrity checking. Other examples include, for larger files, the MD5 Hash. In this example, because the Luhn algorithm is well-described and can be calculated manually, the purpose of the checksum is not to prevent forgery of an NPI, but rather to prevent coarse errors in data transmission, such as typos or misreadings of the NPI. The checksum calculation can easily be implemented in a target system and can be used to check if a given NPI entered by a user is “valid” or not without performing a database lookup.
Look at the pseudocode image, which describes a short computer program.
What is the output of this program?
Select one:
a.
The result is RESULT
b.
The result is 0
c.
The result is 3
Correct. Look at the image for an explanation:
d.
The result is 1
The result is 3
Which one of the following statements is most accurate about Software Development Methodologies. All Systems Development Life Cycles:
Select one:
a.
Have an iterative approach to build
b.
Prevent stakeholders from submitting new requests until the project is complete
c.
Have a process for requirements gathering
d.
Mitigate risk by tackling high risk efforts early on
Have a process for requirements gathering
All SDLCs have a way to gather requirements. The other answer options are not correct, because: 1) Waterfall is an example of an SDLC with a linear rather than iterative approach to build; 2) Different SDLCs stratify risk differently – not all will triage high risk efforts first; and 3) Most SDLCs have a way to introduce change requests.
Bit
binary digit (boolean t/f)
Byte
8 bits
Boolean operations
Conjunction
Disjunction
Negation
XOR
NAND
NOR
and
or
NOT
True or
true, a and b true
half-adder
digital circuit with logic gates (2 bits of input)
FLOP
Floating point operations per second (speed of computation)
Machine code
unique to cpu, not interpretible (binary or hex)
assembly language
shortcut for machine language routines
not readable
Imperative/procedural language
programs are list of tasks, subroutines (FORTRAN, pascal)
Object oriented
object
Class
Instance
Instantiation
Encapsulation
programs are collection of interacting objects
objects have independent functions
attributes (adJ0, methods (verb)
Class- blueprint for an object (dogs)
Instance- specific (beagle)
Instantiation– creating a new object and setting parameters with attributes and methods
Keep attributes and methods private and program can only access it in specific cirumstances