Medication Identifiers and How to Check for Potential Problems

Let’s take a look at the various identifiers in this post. We’ll also review how you can use that data to check for related warning & alerts using the PillFill API services.

Prescription Structure

Let’s begin by looking at an example of a prescription collected by the PillFill RX aggregator (with some fields omitted):

  "rxNumber": "995575",
  "medicationName": "OMEPRAZOLE DR 40 MG CAPSULE",
  "pharmacyStoreId": "CVS #1183",
  "daysSupply": 30,
  "quantityRemaining": 30,
  "dispenseDate": "2014-04-30",
  "computedInactiveAfterDate": "2013-04-29",
  "previousDispenseDates": [
  "brandNames": [
       "Prilosec 40 MG Delayed Release Oral Capsule"
   "quantity": "30",
   "ndc": "00378522293",
   "rxNormId": "200329",
   "ndfrtNui": "N0000156769",
   "ndfrtName": "OMEPRAZOLE 40MG CAP,SA",
   "splId": "44260509-A91C-4906-BCC7-4EB5D3465DED",
   "uuid": "00153170CDEC5571782287505711C59EB63C",

The three most important identifiers included in the prescription data are:

  • The FDA’s National Drug Code (ndc)
  • The FDA’s Structured Product Label (splId)
  • NIH’s RxNorm ID (RxNormId)

We also make liberal use of:

  • The VA’s National Drug File Reference Terminology ID (NUI)
  • The FDA’s UNique Ingredient Identifier (UNII)

Identifier Relationships

The natural question to ask at this point is “Why so many identifiers?” Each identification system provides different levels of understanding to what the medication actually is — a question that can be surprisingly hard to answer at times. Let’s consider Ibuprofen as an example- we have to consider it from multiple perspectives:

  • Drug Ingredients: Which drugs are included / what are the active ingredients? (e.g. Ibuprofen, Acetaminophen & Caffeine)
  • Drug Concept: What’s the strength & form of the drug? (e.g. 200mg Ibuprofen pill, 500mg Acetaminophen pill)
  • Drug Package: How is the drug packaged or group together? Who manufactured it? (e.g. Equate 500ct Ibuprofen, Equate 200ct Ibuprofen 2-Pack, Equate 12ct Ibuprofen Convenience Pack)
  • Drug Product: Which one of the specific drug packages did the patient receive? (Equate 12ct Ibuprofen Convenience Pack)

Each of the above identifiers can help answer those questions:



A very general hierarchy for OTC Ibuprofen (slightly different for RX drugs)

  • Ingredient = UNique Ingredient Identifier (UNII)
  • Concept = RxNorm ID
  • Package = Structured Product Label (SPL)
  • Product = National Drug Code (NDC)

Like with most hierarchal relationships, it’s important for accuracy to start with the most specific identifier available when trying to figure out where something belongs. That’s why PillFill focuses on gathering NDCs whenever possible, since all other relationships can be easily and accurately derived from there. If the NDC is not available, PillFill will associate at least RxNorm/NDFRT identifiers for each prescription.

Medication Warnings & Alerts

So now that we have a working understanding of the medication identifiers, how can we use them to check for potential problems and gain additional insights?

FDA Recalls & Shortage Alerts

The FDA issues recall & shortage alerts primarily based on NDCs. PillFill provides a RESTFul service for checking for such alerts. It’s as simple as you might hope- a HTTP GET call to an endpoint with the 11-Digit NDC from the prescription:

If the drug is found to have any alerts, you’ll get them back in the result set:

	"ndc": ["00603388821"], 
	"type": "recall", 
	"reason": [ "Qualitest Issues Voluntary, Nationwide Recall for One Lot of Hydrocodone Bitartrate and Acetaminophen Tablets, USP 10 mg/500 mg Due to the Potential for Oversized Tablets" ], 
	"resolution": [], 
	"additionalInfoUrl":  ""

Drug Ingredient Overdose Warnings

The FDA has published a Maximum Recommended Therapeutic Dose (MRTD) guideline which identifies the maximum amount of each drug ingredient is considered safe based on the weight of the individual (using mg/kg). PillFill offers another RESTFul service to handle these calculations for solid oral (pill-based) medications:…&weightInKgs=68

For this service to operate correctly, the prescription must have the SplId available and the quantityPerDose / dosesPerDay fields set for each prescription included. The service will then calculate the ingredient dose levels across all products and provide feedback if the value is over 90% of the MRTD level.

     "unii": "KG60484QX9",
     "ingredientName": "Omeprazole",
     "currentLoad": 91,
     "mrtd": 2,
     "relatedRxs": ["RX-ID_0","RX-ID_1"]

Drug/Drug Interactions

To check for potential drug interactions, we’re going to use a NIH-provided RESTful service. It requires the RxNorm ID of each drug to be considered. Again, it’s a relatively simple RESTful GET request to find potential interactions:

When an interaction is found, a response is generated with some (fairly basic) detail about why the interaction is relevant:

			"name":"Simvastatin 40 MG Oral Tablet [Zocor]","tty":"SBD"
			"name":"bosentan 125 MG Oral Tablet","tty":"SCD"
		"description":"Bosentan may decrease the serum concentration of simvastatin by increasing its metabolism. Monitor for changes in the therapeutic and adverse effects of simvastatin if bosentan is initiated, discontinued or dose changed."
			"name":"Simvastatin 40 MG Oral Tablet [Zocor]",
			"name":"Fluconazole 50 MG Oral Tablet [Diflucan]",
		"description":"Increased risk of myopathy/rhabdomyolysis"


Each identifier is useful in different ways, especially considering each service you’ll want to use will require levels of specificity. Once you understand how each interrelates though, you’ll realize the power associated with each of the different identifier and their terminology/information models.

That said, there are countless other checks you can also preform given the specific information found in the prescription- Ingredient allergies using UNIIs, Drug & Condition/Disease Contraindication Checks, etc. Each can help a patient potentially avoid a serious problem that they otherwise would have never considered otherwise. For PHRs to ever go mainstream, they must and should help to that end. It’s no longer enough to simply track pills.

Bitcoin / Eth / Cryptocurrency 加密貨幣


加密貨幣是諸如USD的正常貨幣的交換介質,但是設計用於通過由加密的某些原理 使得可能的過程交換數字信息的目的。密碼術用於保護交易並控制新硬幣的創建。要 創建的第一個加密貨幣是2009年的比特幣。今天有數百種其他加密貨幣,通常稱為 Altcoins。換句話說,cryptocurrency是電轉換成具有貨幣價值的代碼行。在最簡單的 形式中,加密貨幣是數字貨幣。與集中式銀行業務不同,例如美聯儲(Fed)系統,政府 通過打印法定貨幣來控制美元等貨幣的價值,但是政府對加密貨幣的控制並不完全 分散。大多數加密貨幣被設計為隨著時間的推移而減少生產,比如比特幣,這就為它 們創㐀了一個市場上限。這不同於法定貨幣,金融機構總是可以創㐀更多,因此通貨 膨脹。比特幣永遠不會有超過2100萬硬幣流通。所有加密貨幣所基於的技術系統是 由Satoshi Nakamoto創建的。


雖然存在數百種不同的加密貨幣規範,但大多數是從兩種協議之一導出的;工作證明 或權益證明。所有加密貨幣由加密貨幣礦工社區維護,加密貨幣礦工是一般公眾的成 員,他們已經建立了他們的計算機或ASIC機器參與交易的驗證和處理。 第一個加密貨幣是比特幣。比特幣是由名為Satoshi Nakamoto的假名開發商於2009 年創建的。比特幣使用SHA-256,它是由美國國家安全局設計的一組加密散列函數。 比特幣是一種基於工作證明系統的加密貨幣。


比特幣是市場資本,數量,接受度和臭名昭著的最大的加密貨幣,但它不是最有價值 的硬幣。 NEMstake,雖然只有1,116,720美元的市值,交易在1,117美元硬幣。看著市 值,Litecoin在比特幣之後位居第二,Ripple緊隨其後。 你更可能熟悉的一個硬幣是Dogecoin。 Dogecoin平均交易量的三分之一,但具有相 對較低的市值 – 在最大的加密貨幣中排名第六。


加密貨幣挖掘能力的等級是每秒的哈希值。具有1kH / s的計算能力的鑽機以每秒 1,000個散列的㏿率進行挖掘,1MH / s是每秒一百萬個散列,並且GH / s是每秒十億 散列。每當礦工成功地解決一個塊,就創建一個新的哈希。散列算法將此大量數據轉 換為固定長度的散列。像一個代碼,如果你知道的算法,你可以解決一個哈希,並得 到原始數據,但普通眼睛只是一堆數字擠在一起,幾乎不可能得到原始數據。

SHA vs. Scrypt

雖然Bitcoin和幾個其他硬幣開採使用SHA-256,Litecoin和許多其他硬幣,使用 Scrypt。這是兩個主要的哈希函數,但是存在幾種不同的類型,並且被諸如scrypt-N 和x11的其他隱式貨幣使用。採用不同的散列函數來回答SHA-256的關注。之前,個 人能夠利用他們的GPU挖掘比特幣,這需要大量的能量。但隨著比特幣的普及,ASIC SHA-256機器,使GPU開採過時。為了讓您了解這些機器有多麼強大,運行4 GPU的採礦鑽機將獲得大約3.4 MH / s的 散列㏿率並消耗3600kW / h,而ASIC機器可以挖掘6 TH / s並消耗2200kW / h 。這 有效地殺死了GPU挖掘,並留下了許多擔心網絡安全的人。隨著更少的個人能夠從他 們的家庭計算機中獲利,網絡變得不那麼分散。 Scrypt挖掘實現了由於其引入的內存 問題的ASIC耐性的承諾。


加密貨幣是一種專門設計用於利用互聯網架構的貨幣形式。代替依靠標準金融機構 來保證和驗證交易,由貨幣網絡上的用戶的計算機檢查或“確認”加密貨幣交易。驗證 交易的計算機通常會收到少量貨幣作為獎勵。接收獎勵以換取驗證交易的過程被稱 為“挖掘”,並且它是產生新貨幣的主要方式。不同貨幣的採礦工作不同。 因為加密貨幣是完全數字的,它們可以以普通貨幣不能使用的方式使用;主要是使用 它們像數字等價的現金。與銀行發行的信用卡或借記卡不同,您不需要帳戶或信用卡 即可使用加密貨幣,但您可以使用它們從日益多樣化的零售商和個人那裡購買商品 和服務。例如,Overstock.com和Newegg.com接受比特幣作為付款。對於幾乎每個交 易通常都有非常小的費用,但是它通常比信用卡處理費和利息低得多,並且費用支持 網絡。


加密貨幣使用許多不同的算法,並以不同的方式交易。這裡是你應該考慮的主要特 點。

1. 市值和日交易量 2. 驗證方法 3. 零售商接受


加密貨幣的市值是目前流通的所有硬幣的總價值。高市值可以表示每個硬幣的高價 值或僅僅是大量的可用硬幣。也許比市值更重要的是日交易量:每天交換手的硬幣的 價值。相對於市值的高日交易量表示一個健康的經濟,有很多交易。


加密貨幣之間的主要區別之一是它們的驗證方法。最古老和最常見的方法稱為工作 證明。為了獲得驗證交易的權利,計算機必須花費時間和能量解決困難的數學問題。 這種方法的麻煩是它需要大量的能量來操作。股權證明系統試圖通過讓具有最大份 額的貨幣的用戶驗證交易來解決這個問題。這些系統需要較少的處理能力來操作並 聲明更快的事務㏿度,但是關於安全性意味著很少硬幣使用完全基於證明的系統。


加密貨幣沒有多大用處,如果你不能買它。這就是為什麼在你投資之前知道誰接受一 種貨幣是很重要的。一些加密貨幣被廣泛接受,甚至與主要零售商建立合作夥伴關 係。然而,大多數人接受度有限,有些只能兌換其他加密貨幣。一些硬幣根本不是設 計用於交換貨物的,而是為其他目的而建㐀的。

加密貨幣礦業與比特幣礦業盈利能力 2016 Dec


以下列出的加密貨幣正在與比特幣挖掘進行比較,以確定加密貨幣是否比挖礦比特 幣更有利可圖。顯示的加密貨幣利潤率信息基於使用輸入的哈希率值的統計計算,並 且不考慮難度和匯率波動,陳舊/拒絕/孤立利率,池的效率和池費用。您的個人盈利 能力可能會有所不同。


哈希率 BitCoin 2016

矿工收入 支付给矿工的coinbase块奖励和交易费用的总值。


困難 317,688,400,354

市場價 1044.61 USD


第一是是否獨立開採或參與採礦池。當比特幣開採時,沒有以穩定,漸進的方式收到付款。相反,當特定的里程碑受到打擊時,他們會被大批量發給那些打中了里程碑的人。如果你沒有運行一堆超級快速的挖掘計算機,可能你永遠不會是一個達到里程碑並收到付款的人。在採礦池中,許多用戶作為一個團體聯合力量進行挖掘,並且根據他們已經貢獻了多少計算能力,所有獎勵支付被分配到組中。這簡化了獎勵結構,使您的付款更可靠。你可以選擇獨奏,但對於任何人只是進入altcoin挖掘,一個游泳池是一個更好的選擇 – 尤其是如果你不開採一個房間充滿強大的電腦。本指南的其餘部分將假設您正在池中開採。每個altcoin有不同的池,雖然一些池根據上升和下降的價值在不同的貨幣之間切換。每個泳池都有利弊,但大部分情況下,你選擇哪一個都沒關係。為了找到一個流行的游泳池,訪問一個社區網站為你感興趣的錢幣。


這樣,你可以使用你的GPU,CPU或兩者來挖掘Litecoin或大多數其他山寨幣。當您開始在您的帳戶中累積硬幣時,您可以訪問礦業池的網站並輸入地址以將硬幣發送到您的個人錢包。您可以在先前下載的客戶端的“接收”選項卡中找到您的錢包地址。一旦您開始在您的錢包中保存硬幣,您應該啟用加密它通過點擊設置 – >啟用加密,並選擇一個安全的密碼。然後,請務必定期備份您的錢包,方法是點擊文件 – >備用電子錢包。如果你失去了你的硬盤驅動器,沒有你的錢包備份到某個地方安全,你會失去你的所有硬幣。不幸的是,你可能不能夠賺大量利潤挖礦山幣。新的ASIC板正在設計目標為LiteCoin和其他基於Scrypt的altcoins,他們將迫使大功率GPU採礦鑽機脫離競爭。然而,現在,挖掘是一種有趣的方式來了解一項技術,這可能是十年中最重要的發明,而不是讓你的退休基金在線。


S9 Antminer Rig

每天的電力成本 $ 3.96

每週回報 $ 42.95

每天返回 $ 6.14

每月返回 $ 184.05

投資回收期 342 days


S9是Bitmain最新的2016年產品。與14 TH為$ 2100這是家庭比特幣礦工市場上最好的機器之一。隨著比特幣獎勵減半在2016年年中,S9肯定是成本曲線中更有競爭力的機器之一。



Hashflare Review –

Genesis Mining Review –


Bitcoinming –

Review Proposal of the Investment in Google Doc




CouchDB for the future

CouchDB is a storage system useful on its own. You can build many applications with the tools CouchDB gives you. But CouchDB is designed with a bigger picture in mind. Its components can be used as building blocks that solve storage problems in slightly different ways for larger and more complex systems.Whether you need a system that’s crazy fast but isn’t too concerned with reliability (think logging), or one that guarantees storage in two or more physically separated locations for reliability, but you’re willing to take a performance hit, CouchDB lets you build these systems.There are a multitude of knobs you could turn to make a system work better in one area, but you’ll affect another area when doing so. One example would be the CAP theorem discussed in the next chapter. To give you an idea of other things that affect storage systems, see Figures 2 and 3.

By reducing latency for a given system (and that is true not only for storage systems), you affect concurrency and throughput capabilities.

Figure 2. Throughput, latency, or concurrency

Figure 3. Scaling: read requests, write requests, or data

When you want to scale out, there are three distinct issues to deal with: scaling read requests, write requests, and data. Orthogonal to all three and to the items shown in Figures 2 and 3 are many more attributes like reliability or simplicity. You can draw many of these graphs that show how different features or attributes pull into different directions and thus shape the system they describe.

CouchDB is very flexible and gives you enough building blocks to create a system shaped to suit your exact problem. That’s not saying that CouchDB can be bent to solve any problem—CouchDB is no silver bullet—but in the area of data storage, it can get you a long way.

CouchDB Replication

CouchDB replication is one of these building blocks. Its fundamental function is to synchronize two or more CouchDB databases. This may sound simple, but the simplicity is key to allowing replication to solve a number of problems: reliably synchronize databases between multiple machines for redundant data storage; distribute data to a cluster of CouchDB instances that share a subset of the total number of requests that hit the cluster (load balancing); and distribute data between physically distant locations, such as one office in New York and another in Tokyo.

CouchDB replication uses the same REST API all clients use. HTTP is ubiquitous and well understood. Replication works incrementally; that is, if during replication anything goes wrong, like dropping your network connection, it will pick up where it left off the next time it runs. It also only transfers data that is needed to synchronize databases.

A core assumption CouchDB makes is that things can go wrong, like network connection troubles, and it is designed for graceful error recovery instead of assuming all will be well. The replication system’s incremental design shows that best. The ideas behind “things that can go wrong” are embodied in the Fallacies of Distributed Computing:

  1. The network is reliable.
  2. Latency is zero.
  3. Bandwidth is infinite.
  4. The network is secure.
  5. Topology doesn’t change.
  6. There is one administrator.
  7. Transport cost is zero.
  8. The network is homogeneous.

Existing tools often try to hide the fact that there is a network and that any or all of the previous conditions don’t exist for a particular system. This usually results in fatal error scenarios when something finally goes wrong. In contrast, CouchDB doesn’t try to hide the network; it just handles errors gracefully and lets you know when actions on your end are required.

Local Data Is King

CouchDB takes quite a few lessons learned from the Web, but there is one thing that could be improved about the Web: latency. Whenever you have to wait for an application to respond or a website to render, you almost always wait for a network connection that isn’t as fast as you want it at that point. Waiting a few seconds instead of milliseconds greatly affects user experience and thus user satisfaction.

What do you do when you are offline? This happens all the time—your DSL or cable provider has issues, or your iPhone, Android, or Blackberry has no bars, and no connectivity means no way to get to your data.

CouchDB can solve this scenario as well, and this is where scaling is important again. This time it is scaling down. Imagine CouchDB installed on phones and other mobile devices that can synchronize data with centrally hosted CouchDBs when they are on a network. The synchronization is not bound by user interface constraints like subsecond response times. It is easier to tune for high bandwidth and higher latency than for low bandwidth and very low latency. Mobile applications can then use the local CouchDB to fetch data, and since no remote networking is required for that, latency is low by default.

Can you really use CouchDB on a phone? Erlang, CouchDB’s implementation language has been designed to run on embedded devices magnitudes smaller and less powerful than today’s phones.

At the end, this is what the CouchDB defined.



In my point of view:

CouchDB (from their website)

  • A document database server, accessible via a RESTful JSON API. Generally, relational databases aren’t simply accessed via REST services, but require a much more complex SQL API. Often these API’s (JDBC, ODBC, etc.) are quite complex. REST is quite simple.
  • Ad-hoc and schema-free with a flat address space. Relational databases have complex, fixed schema. You define tables, columns, indexes, sequences, views and other stuff. Couch doesn’t require this level of complex, expensive, fragile advanced planning.
  • Distributed, featuring robust, incremental replication with bi-directional conflict detection and management. Some SQL commercial products offer this. Because of the SQL API and the fixed schemas, this is complex, difficult and expensive. For Couch, it appears simple and inexpensive.
  • Query-able and index-able, featuring a table oriented reporting engine that uses Javascript as a query language. So does SQL and relational databases. Nothing new here.

So. Why CouchDB?

  • REST is simpler than JDBC or ODBC.
  • No Schema is simpler than Schema.
  • Distributed in a way that appears simple and inexpensive.