Computer programming Flashcards

1
Q

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

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The last digit of the NPI (National Provider Identifier) is an example of

Select one:

a.
Checksum

b.
Endianness

c.
Steganography

d.
Cryptography

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

The result is 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Bit

A

binary digit (boolean t/f)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Byte

A

8 bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Boolean operations
Conjunction
Disjunction
Negation
XOR
NAND
NOR

A

and
or
NOT

True or
true, a and b true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

half-adder

A

digital circuit with logic gates (2 bits of input)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

FLOP

A

Floating point operations per second (speed of computation)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Machine code

A

unique to cpu, not interpretible (binary or hex)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

assembly language

A

shortcut for machine language routines
not readable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Imperative/procedural language

A

programs are list of tasks, subroutines (FORTRAN, pascal)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Object oriented

object

Class

Instance

Instantiation

Encapsulation

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

composition

A

objects composed from smaller objects

17
Q

inheritance

A

objects can inherit parent object atributes, structure
manager and staff of– parent class “employee”

18
Q

Polymorphism

A

objects can override their parent attributes

19
Q

qualitative data

A

Nominal
Ordinal

20
Q

Quantitive data

A

Interval– values represent the same distance

Ratio– zero means something

21
Q

Interval to ratio

A

years diagnosed with cancer–> years since diagnosis of cancer

22
Q

Interval to ordinal

A

binning (age–> neonate, adult)

23
Q

data structures

Primitives

Array (position/key/index)
washington, admas, jefferson , madison

Strings

Date

Time

A

primitives (bookean, char, float, int)

24
Q

know how to do a trace table from pseudocode

A

51:45 programming

25
Q

modulo 13 mod 5

A

3

26
Q

hash function

A

algo that maps data of arbitrary length to data of fixed length (checksum)

27
Q

SDLC: watefall vs agile (daily scrum)

A
28
Q

System integration

A

standards– HL7, web services, networking

29
Q

White box vs black box test case development approaches

A

white– test inner workings (code coverage)
black - test from end user standpoint (if user enters order, does EHR display order is active and signed)

30
Q

unicode standard

A

16
base 16 hexdeximal

31
Q

ascii

A

8 bit binary representation of text